<extend name="Public/base"/>
<block name="body">
	
	<include file="Public:banner" />
	<div class="am-container">
		<if condition="$config['INDEX_CONTENT'] eq 'article'">
			<if condition="$config['LAYOUT'] eq 'h'">
				<include file="Public:article_list_h" />
				<div class="am-g">
					<button id="next" class="hidden btn-get-more" data-url="{$next_page}">
						点击加载更多
					</button>
				</div>
				<elseif condition="$config['LAYOUT'] eq 'v'"/>
				<include file="Public:article_list_v" />
			</if>
			<elseif condition="$config['INDEX_CONTENT'] eq 'goods'"/>
			
			<notempty name="cate">
				<volist name="cate" id ="v">
					<div class="am-g index-cate">
						<h3>{$v.cate_name}<a class="more" href="{:U('Goods/cate',array('id'=>$v['cate_id']))}">更多</a></h3>
						<include file="Public:index_goods_list" />
					</div>
				</volist>
			</notempty>

			
		</if>
	</div>
</block>
<block name="script">
<script>
	 $(function(){
		  $(".goods-list li").hover(
 				function(){
 				   //当鼠标放上去的时候,程序处理
 				   $(this).addClass("hover1 hover");
 				},
 				function(){
 				   //当鼠标离开的时候,程序处理
 				   $(this).removeClass("hover1 hover");
 		}); 
 		highlight_subnav("{:U('Index/index')}"); 
 		
 		$('.goods-list').find('li').each(function(){

			a = $('.goods-list').innerWidth()/4*1.4;
			b = $('.goods-list').innerWidth()/4*0.95;
			$(this).find('.goods-pic').each(function(){
				$(this).innerHeight(Math.round(b)-1);	
			});
			$(this).innerHeight(Math.round(a)-1);	
			
		});
	}); 
	function response(){
        $('.article-list>ul>li').hover(
            function(){
                $(this).css('box-shadow','0px 2px 8px 3px #ccc');
            },
            function(){
                $(this).css('box-shadow','');
            }

        );
        $('.lazy').lazyload( {
            effect : "fadeIn",
            failure_limit : 12
        });
	}
</script>	 
</block>